﻿#region Copyright information
// 
// Copyright © 2012-2013 Yongkee Cho. All rights reserved.
// 
// This code is a part of the SubnetworkToolkit and governed under the terms of the
// GNU Lesser General  Public License (LGPL) version 2.1 which accompanies this distribution.
// For more information on the LGPL, please visit http://bol.codeplex.com/license.
// 
// - Filename: GoTerm.cs
// - Author: Yongkee Cho
// - Email: yongkeecho@outlook.com
// - Date Created: 2013-01-30 2:55 PM
// - Last Modified: 2013-01-30 3:21 PM
// 
#endregion
using System;
using System.Collections.Generic;

namespace SubnetworkToolkit
{
    public class GoTerm : IEquatable<GoTerm>
    {
        public int Id { get; private set; }
        public string Term { get; private set; }
        public int Category { get; private set; }
        public IList<int> Genes { get; private set; }

        public GoTerm(int id, string term, int category)
        {
            Id = id;
            Term = term;
            Category = category;
            Genes = new List<int>();
        }

        public override int GetHashCode()
        {
            return Id;
        }

        public bool Equals(GoTerm other)
        {
            return Id.Equals(other.Id);
        }

        public override string ToString()
        {
            return string.Format("{0}\t{1}\t{2}", Id, Category, Term);
        }
    }
}